<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/common/inc/incSession.jsp" %>
<jsp:include page="/common/inc/Top.jsp" />

<script>

$().ready(function() {
	// validate the comment form when it is submitted
	$("#memberJoin").validate({
		rules: {
			member_id : {
				required : true,
				remote: {type     :"post",
					     url      :"check_id.jsp"}
			},
			member_name : "required",
			nickname :  {
				required : true,
				remote: {type     :"post",
					     url      :"check_nick.jsp"}
			},
			email    : "required",			
			member_pw: "required",
			member_pw2 : {
				required: true,
				equalTo: "#member_pw"
			},
			hp    : "required",
			zipcode : "required",
			addr1 : "required",
			addr2 : "required"
		},
			
	  messages: {
		  member_id :  {
			  required : "아이디를 입력해주세요",
			  remote   : "이미 등록된 아이디입니다"
		  },
		  member_name : "이름을 입력해주세요",
		  nickname : {
			  required : "닉네임을 입력해주세요",
			  remote   : "이미 등록된 닉네임입니다"
		  },
		  email     : {
			  required : "이메일을 입력해주세요"
		  },
		  member_pw  : "비밀번호를 입력해 주세요",
		  member_pw2: {
				required: "비밀번호 확인을 입력해 주세요",
				equalTo : "비밀번호 확인을 해주세요"
		  },
		  hp    : "핸드폰번호를 입력해 주세요",
		  zipcode : "우편번호를 입력해 주세요",
		  addr1 : "주소를 입력해 주세요",
		  addr2 : "상세주소를 입력해 주세요"
	  }
	});
});

function postSearch(){
	window.open('/common/zipcode/postSearch.jsp','','width=386,height=400,top=300,scrollbars=yes');
}


</script>
<body>

<form name="form" method="post" id="memberJoin" action="join_p.jsp" enctype="multipart/form-data">
<table border="0">
	<tr>
		<td>아이디:<input type="text" name="member_id" id="member_id" /></td>
	</tr> 
	<tr>
		<td>비밀번호:<input type="password" name="member_pw" id="member_pw" /> </td>
	</tr>
	<tr>
		<td>비밀번호확인:<input type="password" name="member_pw2" id="member_pw2" /> </td>
	</tr>
	<tr>
		<td>이름:<input type="text" name="member_name" id="member_name" /></td>
	</tr>
	<tr>
		<td>닉네임:<input type="text" name="nickname" id="nickname" /></td>
	</tr>
	<tr>
		<td>이메일:<input type="text" name="email" id="email" /> </td>
	</tr>
	<tr>
		<td>핸드폰번호:<input type="text" name="hp" id="hp"/> </td>
	</tr>
	<tr>
		<td>우편번호<input type="text" name="zipcode" size="7" readonly> <input type="button" value="우편번호"  onClick="postSearch()"> </td>
	</tr>
	<tr>
		<td>주소:<input type="text" name="addr1" id="addr1" size="30"readonly/> </td>
	</tr>
	<tr>
		<td>상세주소:<input type="text" name="addr2" id="addr2" size="30"/> </td>
	</tr>
	<tr>
		<td>회원사진:<input type="file" name="member_img" /></td>
	</tr>
</table>

<input type="submit" value="회원가입">
</form>


		
	
</body>
</html>